<?php
namespace app\admin\model;
use think\Model;

class Returnwater extends model{
	function findwater($p,$n,$uid){
		$res = $this->where(['n'=>$n,'uid'=>$uid])->find();
		if($p=1){
			return $res["ts"];
			exit;
		}else if($p=2){
			return $res["ts2"];
			exit;
		}else if($p==3){
			return $res["ts3"];
			exit;
		}else{
			return $res["ts4"];
		}
	}
	function finduid($id){
		$res = db('returnwater')->where(['uid'=>$id])->order('n asc')->select();
		return $res;
	}
}